package com.sg.dto.biz.pbff.common;

import com.wicket.okrpbff.common.annotations.TreeType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc BffTaskCategoriesDto
 * @使用场景
 */
@Data
public class BffTaskCategoriesDto implements Serializable {

    /**
     * 类型字典ID
     */
    @ApiModelProperty("类型字典ID")
    private String typeDictionaryId;

    /**
     * 上级类型字典编码
     */
    @TreeType("pid")
    @ApiModelProperty("上级类型字典编码")
    private String parentTypeDictionaryCode;

    /**
     * 类型字典编码
     */
    @TreeType("id")
    @ApiModelProperty("类型字典编码")
    private String typeDictionaryCode;

    /**
     * 类型字典名称
     */
    @ApiModelProperty("类型字典名称")
    private String typeDictionaryName;

    /**
     * 主题标识
     */
    @ApiModelProperty("主题标识")
    private String themeCode;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        BffTaskCategoriesDto that = (BffTaskCategoriesDto) o;
        return typeDictionaryId == that.typeDictionaryId && parentTypeDictionaryCode == that.parentTypeDictionaryCode && typeDictionaryCode == that.typeDictionaryCode && typeDictionaryName == that.typeDictionaryName && themeCode == that.themeCode;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), typeDictionaryId, parentTypeDictionaryCode, typeDictionaryCode, typeDictionaryName, themeCode);
    }

}
